package xyz.qduwo.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "Canvas_Creator", schema = "dbo", catalog = "streamboard")
public class CanvasCreatorEntity {
    private int id;
    private int canvas;
    private int creator;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "canvas")
    public int getCanvas() {
        return canvas;
    }

    public void setCanvas(int canvas) {
        this.canvas = canvas;
    }

    @Basic
    @Column(name = "creator")
    public int getCreator() {
        return creator;
    }

    public void setCreator(int creator) {
        this.creator = creator;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CanvasCreatorEntity that = (CanvasCreatorEntity) o;
        return id == that.id &&
                canvas == that.canvas &&
                creator == that.creator;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, canvas, creator);
    }
}
